{include file="public/header" /}
{load href="__PLUGINS__bootstrap/bootstrap-table.min.css"}
{load href="__PLUGINS__bootstrap/bootstrap-table.min.js"}
<style type="text/css">
    #des, #des input {
        width: 40px;
        text-align: center;
    }

    #id {
        width: 78px;
    }

    .bs-checkbox {
        width: 36px;
        height: 40px
    }

    .fixed-table-toolbar .columns, .fixed-table-toolbar .search {
        margin-left: 0px;
        margin-top: 0px
    }

    #title span {
        float: right;
    }

    .asdlkjasd {
        background: #1ab394;
        color: #fff
    }
</style>
<body class="gray-bg">
<div class="wrapper wrapper-content {:config('adminClass.main')}">
    <div class="ibox float-e-margins">
        {include file="public/tophead"}
        {include file="public/top" /}
        <div class="ibox-content">
            {include file="public/topsection"}
            <div class="row row-lg">
                <div class="col-sm-12">
                    <div class="fixed-table-toolbar">
                        <a class="btn btn-default btn-outline {present name='channel_sex'}{eq name='channel_sex' value='2'}asdlkjasd{/eq}{/present}" href="{:url('topupcate',['channel_sex'=>2])}">金币(男)</a>
                        <a class="btn btn-default btn-outline {present name='channel_sex'}{eq name='channel_sex' value='1'}asdlkjasd{/eq}{/present}" href="{:url('topupcate',['channel_sex'=>1])}">豆豆(女)</a>
                    </div>
                    <div class="example">
                        <form class="form-horizontal" method="post">
                            <table data-toggle="table">
                                <thead>
                                <tr>
                                    <th data-align="center">排序</th>
                                    <th data-align="center">ID</th>
                                    <th data-align="center">首充价</th>
                                    <th data-align="center">价格</th>
                                    {if condition="$channel_sex == 2"}
                                    <th data-align="center">金币</th>
                                    <th data-align="center">赠送金币</th>
                                    {else /}
                                    <th data-align="center">豆豆</th>
                                    {/if}
                                    <th data-align="center">赠送VIP</th>
                                    <th data-align="center">VIP天数</th>
                                    <th data-align="center">状态</th>
                                    <th data-align="center">管理</th>
                                </tr>
                                </thead>
                                <tbody id="form">
                                {php}$hide=array('0'=>'<font color="#f00">禁止</font>','1'=>'<font color="#1ab394">正常</font>','2'=>'审核','3'=>'<font color="#f00">拒绝</font>');{/php}
                                {volist name="data" id="v"}
                                <tr id="id{$v.id}" class="class">
                                    <td>{$v.sort}</td>
                                    <td>{$v.id}</td>
                                    <td>{if condition='$v.first_price > 0'}{$v.first_price}{/if}</td>
                                    <td>{$v.price}</td>
                                    {if condition="$channel_sex == 2"}
                                    <td>{$v.money}</td>
                                    <td>{if condition='$v.reward_money > 0'}{$v.reward_money}{/if}</td>
                                    {else /}
                                    <td>{$v.money}</td>
                                    {/if}
                                    <td>
                                        {if condition='$v.reward_noble'}
                                            {if condition='isset($nobles[$v.reward_noble])'}
                                                {$nobles[$v.reward_noble]}
                                            {/if}
                                        {/if}
                                    </td>
                                    <td>{if condition='$v.reward_noble_day > 0'}{$v.reward_noble_day}{/if}</td>
                                    <td>{if condition="$v.is_hidden"}<div style="color:red">隐藏</div>{else /}<div style="color:#1ab394">显示</div>{/if}</td>
                                    <td>
                                        <div class="btn-group">
                                            <div data-toggle="dropdown" class="btn btn-primary btn-xs dropdown-toggle">操作 <span class="caret"></span>
                                            </div>
                                            <ul class="dropdown-menu">
                                                <li><a onClick="add('{:url('topupcateadd',['id'=>$v['id'],'url'=>-1])}')">修改</a>
                                                </li>
                                                <li class="divider"></li>
                                                <li><a onClick="del({$v.id})">删除</a>
                                                </li>
                                            </ul>
                                        </div>
                                    </td>
                                </tr>
                                {/volist}
                                </tbody>
                            </table>
                        </form>
                    </div>
                </div>
            </div>
            <hr>
            <div class="row row-lg">
                <div class="col-sm-12 pages">{$page}</div>
            </div>
        </div>
    </div>
</div>
{include file="public/footer" /}

<script type="text/javascript">
    function del(id){
        swal_del(id,"{:url('topupcatedel')}")
    }
</script>
 